package com.xbongbong.pro.dataset.enumus;

import com.xbongbong.pro.dataset.exception.DataBaseAccessException;

/**
 * @author gzt
 * @version 1.0
 * @Description -
 * @datetime - 2022/5/20-10:36
 * @since v1.0
 */
public enum DBAType {
    SQLSERVER(0, "ATOM", "atom连接", ""),
    CLICKHOUSE(22, "CLICKHOUSE", "CLICKHOUSE连接", "com.xbb.clickhouse.ClickHouseAccess"),
    ;

    private int typeCode;
    private String strType;
    private String desc;
    private String className;

    public String getStrType() {
        return this.strType;
    }

    private DBAType(int typeCode, String strType, String desc, String className) {
        this.typeCode = typeCode;
        this.strType = strType;
        this.desc = desc;
        this.className = className;
    }

    public String getDesc() {
        return this.desc;
    }

    public int getTypeCode() {
        return this.typeCode;
    }

    public String getType() {
        return this.toString();
    }

    public String getClassName() {
        return this.className;
    }

    public static DBAType getDBATypeByTypeCode(int typeCode) {

        return null;
    }

    public static DBAType getDBATypeByStrType(String strType) throws DataBaseAccessException {
            throw new DataBaseAccessException("未定义的平台名称");
        }
}
